$(function () {
    // 获取粉丝列表
    var loading = weui.loading('loading', {
        className: 'custom-classname'
    });
    var result = Model.user.getMyAttention({
        type: 1
    });
    if (!sessionStorage.getItem('hmdj_stopError')) {
        sessionStorage.setItem('hmdj_stopError', true);
    } else {
        if (result.code) {
            Common.fn.formatOutput(result);
            loading.hide();
            return false;
        }
    }
    for (var i = 0; i < result.data.length; i++) {
        var item = '<div class="weui-cell concerns-item" data-link="' + result.data[i].businessId + '"><div class="shop-vendor-left"><div class="portrait-block"><img class="portrait-img" src="' + result.data[i].photo + '"></div></div><div class="weui-cell__hd"><label class="vendor-level fans-grade">v' + result.data[i].grade + '</label></div><div class="weui-cell__bd"><h3 class="text-1-6">' + result.data[i].nickname + '</h3></div></div>'
        $(".s-content").append(item);
    }
    loading.hide();
});

$(document).on('click', '.concerns-item', function() {
	var id = $(this).attr('data-link')
	location.href = 'shop_detail.html?id=' + id
})